package com.yangjun.dao.mybatis.mapper.usermanage;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yangjun.entity.usermanage.LogEntity;
import com.yangjun.entity.usermanage.MenuEntity;
import com.yangjun.entity.usermanage.UsersEntity;

public interface UserManageMapper {
	
	UsersEntity getCurrentUserInfo(@Param(value="username") String username,@Param(value="password") String password);
	/**
	 * 获取用户权限
	 * @param permissionlist
	 * @return
	 */
	List<String> getUserMenuList(@Param(value="username") String username,@Param(value="password") String password);
	
	List<String> getUserReportMenuList(@Param(value="username") String username);
	
	
	/**
	 * 根据菜单获取用户信息
	 * @param menuid
	 * @return
	 */
	List<UsersEntity> getMenuUsers(@Param(value="menuid") String menuid);
	
	
	/**
	 * 查询当前菜单没有权限的用户
	 * @param menuid
	 * @param username
	 * @param realname
	 * @return
	 */
	List<UsersEntity> getNoCurrentMenuUsers(@Param(value="menuid") String menuid,
			@Param(value="name") String name);
	
	
	/**
	 * 获取所有用户
	 * @param username
	 * @param realname
	 * @return
	 */
	List<UsersEntity> getAllUsers(@Param(value="name") String name);
	
	/**
	 * 获取用户菜单权限
	 * @param userid
	 * @return
	 */
	List<MenuEntity> getUserMenu(@Param(value="userid") String userid);
	
	/**
	 * 获取所有菜单
	 * @return
	 */
	List<MenuEntity> getAllMenu();
	
	
	/**
	 * 获取用户日志
	 * @return
	 */
	List<LogEntity> getAllUserLog(@Param(value="name") String name);
	List<LogEntity> getAllUserLogDetail(@Param(value="username") String username,@Param(value="ip") String ip);


	String getCurrentUsernameById(@Param(value="userid") String userid);


}




